from django.db import models

from apps.common.model import BaseModel


class Person(BaseModel):
    """
    个人信息姓名、电话、微信、邮箱和个人照片。
    """
    name = models.CharField(max_length=100, verbose_name="姓名")
    phone = models.CharField(max_length=20, verbose_name="电话")
    wechat = models.CharField(max_length=100, verbose_name="微信")
    email = models.EmailField(max_length=255, verbose_name="邮箱")
    photo = models.ImageField(upload_to='jobs/', verbose_name="个人照片", blank=True, null=True)

    def __str__(self):
        return self.name

    class Meta:
        verbose_name = "个人信息"
        verbose_name_plural = "个人信息"

